package com.libre.controller;

import javax.print.event.PrintJobEvent;
import javax.print.event.PrintJobListener;
import javax.xml.bind.SchemaOutputResolver;

public class MyPrintJobListener implements PrintJobListener {
    private PrintJobEvent pje;

    @Override
    public void printDataTransferCompleted(PrintJobEvent pje) {
        System.out.println("已成功地将数据传输到打印服务，客户端可以释放分配给该数据的本地资源。");
    }

    @Override
    public void printJobCanceled(PrintJobEvent pje) {
        System.out.println("调用此方法来通知客户端，作业已被用户或程序取消。");
    }

    @Override
    public void printJobCompleted(PrintJobEvent pje) {
        System.out.println("调用此方法来通知客户端，作业已成功完成。");
    }

    @Override
    public void printJobFailed(PrintJobEvent pje) {
        System.out.println("调用此方法来通知客户端，无法成功完成作业，必须重新提交该作业。");
    }

    @Override
    public void printJobNoMoreEvents(PrintJobEvent pje) {
        System.out.println("调用此方法来通知客户端，不需要再提供事件。");
    }

    @Override
    public void printJobRequiresAttention(PrintJobEvent pje) {
        System.out.println("调用此方法来通知客户端，发生了一个用户也许能够修复的错误，可以生成此事件的一个错误示例是打印机用完了纸张。");
    }


}
